import Vue from "vue";
import mask from "@/components/mask/mask.vue";

let instance;
export const showMask= ()=>{
  let constructor = Vue.extend(mask);
  instance = new constructor()
  let div = document.createElement('div');
  document.body.appendChild(div);
  instance.$mount(div);
}

export const hideMask= ()=>{
  console.log(instance);
    if (instance){
      instance.$destroy();
      document.body.removeChild(instance.$el);
      instance=null;
    }
}